<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/static/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{/static/layuiadmin/style/admin.css}" media="all">
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">快捷方式</div>
                        <div class="layui-card-body">
                            <div class="layui-carousel layadmin-carousel layadmin-shortcut">
                                <div carousel-item>
                                    <ul class="layui-row layui-col-space10" sec:authorize="hasRole('ROLE_ADMIN')">
                                        <li class="layui-col-xs3">
                                            <a lay-href="user/info">
                                                <i class="layui-icon layui-icon-console"></i>
                                                <cite>基本资料</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="book/bookType">
                                                <i class="layui-icon layui-icon-chart"></i>
                                                <cite>图书类型管理</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="book/bookInformation">
                                                <i class="layui-icon layui-icon-template-1"></i>
                                                <cite>图书信息管理</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="book/bookRepertory">
                                                <i class="layui-icon layui-icon-chat"></i>
                                                <cite>库存管理</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="role/userType">
                                                <i class="layui-icon layui-icon-username"></i>
                                                <cite>用户类型管理</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="user/userInformation">
                                                <i class="layui-icon layui-icon-user"></i>
                                                <cite>用户信息管理</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="borrow/information">
                                                <i class="layui-icon layui-icon-form"></i>
                                                <cite>借阅记录</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="record">
                                                <i class="layui-icon layui-icon-template"></i>
                                                <cite>操作日志</cite>
                                            </a>
                                        </li>
                                    </ul>

                                    <!--图书管理员权限-->
                                    <ul class="layui-row layui-col-space10" sec:authorize="hasRole('ROLE_BOOKS')">
                                        <li class="layui-col-xs3">
                                            <a lay-href="user/info">
                                                <i class="layui-icon layui-icon-console"></i>
                                                <cite>基本资料</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="book/bookType">
                                                <i class="layui-icon layui-icon-chart"></i>
                                                <cite>图书类型管理</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="book/bookInformation">
                                                <i class="layui-icon layui-icon-template-1"></i>
                                                <cite>图书信息管理</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="book/bookRepertory">
                                                <i class="layui-icon layui-icon-chat"></i>
                                                <cite>库存管理</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="borrow/information">
                                                <i class="layui-icon layui-icon-template"></i>
                                                <cite>借阅记录</cite>
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">待办事项</div>
                        <div class="layui-card-body">
                            <div class="layui-carousel layadmin-carousel layadmin-backlog">
                                <div carousel-item>
                                    <ul class="layui-row layui-col-space10">
                                        <li class="layui-col-xs6">
                                            <a class="layadmin-backlog-body" lay-href="borrow/information">
                                                <h3>已借书人数</h3>
                                                <p>
                                                    <cite th:if="${borrow==0}">0</cite>
                                                    <cite th:if="${borrow!=0}" th:text="${borrow}"></cite>
                                                </p>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs6">
                                            <a class="layadmin-backlog-body" lay-href="borrow/information">
                                                <h3>待还书人数</h3>
                                                <p>
                                                    <cite th:if="${borrow1==0}">0</cite>
                                                    <cite th:if="${borrow1!=0}" th:text="${borrow1}"></cite>
                                                </p>
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script th:src="@{/static/layuiadmin/layui/layui.js}"></script>
<script>
    layui.config({
        base: '../static/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'console']);
</script>
</body>
</html>